﻿using System;
using System.Data;
using System.Text;
using WeifenLuo.WinFormsUI.Docking;
using System.Windows.Forms;
using CoreScanner;
using System.Xml;
using System.Collections;
using System.Collections.Generic;

namespace docmgr.WinForm
{
    class ResizeForm
    {
        public struct controlRect
        {
            public int Left;
            public int Top;
            public int Width;
            public int Height;
        }
        public List<controlRect> oldCtrl = new List<controlRect>();

        public void controlIni(Control mForm)
        {
            controlRect cR;
            cR.Left = mForm.Left;
            cR.Top = mForm.Left;
            cR.Width = mForm.Width;
            cR.Height = mForm.Height;
            AddControl(mForm);
        }

        private void AddControl(Control ctl)
        {
            foreach(Control c in ctl.Controls)
            {
                controlRect objCtrl;
                objCtrl.Left = c.Left;
                objCtrl.Top = c.Left;
                objCtrl.Width = c.Width;
                objCtrl.Height = c.Height;
                oldCtrl.Add(objCtrl);
                if (c.Controls.Count > 0)
                    AddControl(c);
            }
        }

        public void controlAutoSize(Control mFrom)
        {

        }
    }
}
